// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * WidgetInstancePage generated by hbm2java
 */
@Entity
@Table(name = "widget_instance_page", catalog = "magento")
public class WidgetInstancePage implements java.io.Serializable {
	private static final long serialVersionUID = 121323L;

	private Integer pageId;
	private WidgetInstance widgetInstance;
	private String pageGroup;
	private String layoutHandle;
	private String blockReference;
	private String pageFor;
	private String entities;
	private String pageTemplate;
	private Set widgetInstancePageLayouts = new HashSet(0);

	public WidgetInstancePage() {
	}

	public WidgetInstancePage(WidgetInstance widgetInstance) {
		this.widgetInstance = widgetInstance;
	}

	public WidgetInstancePage(WidgetInstance widgetInstance, String pageGroup,
			String layoutHandle, String blockReference, String pageFor,
			String entities, String pageTemplate, Set widgetInstancePageLayouts) {
		this.widgetInstance = widgetInstance;
		this.pageGroup = pageGroup;
		this.layoutHandle = layoutHandle;
		this.blockReference = blockReference;
		this.pageFor = pageFor;
		this.entities = entities;
		this.pageTemplate = pageTemplate;
		this.widgetInstancePageLayouts = widgetInstancePageLayouts;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "page_id", unique = true, nullable = false)
	public Integer getPageId() {
		return this.pageId;
	}

	public void setPageId(Integer pageId) {
		this.pageId = pageId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "instance_id", nullable = false)
	public WidgetInstance getWidgetInstance() {
		return this.widgetInstance;
	}

	public void setWidgetInstance(WidgetInstance widgetInstance) {
		this.widgetInstance = widgetInstance;
	}

	@Column(name = "page_group", length = 25)
	public String getPageGroup() {
		return this.pageGroup;
	}

	public void setPageGroup(String pageGroup) {
		this.pageGroup = pageGroup;
	}

	@Column(name = "layout_handle")
	public String getLayoutHandle() {
		return this.layoutHandle;
	}

	public void setLayoutHandle(String layoutHandle) {
		this.layoutHandle = layoutHandle;
	}

	@Column(name = "block_reference")
	public String getBlockReference() {
		return this.blockReference;
	}

	public void setBlockReference(String blockReference) {
		this.blockReference = blockReference;
	}

	@Column(name = "page_for", length = 25)
	public String getPageFor() {
		return this.pageFor;
	}

	public void setPageFor(String pageFor) {
		this.pageFor = pageFor;
	}

	@Column(name = "entities", length = 65535)
	public String getEntities() {
		return this.entities;
	}

	public void setEntities(String entities) {
		this.entities = entities;
	}

	@Column(name = "page_template")
	public String getPageTemplate() {
		return this.pageTemplate;
	}

	public void setPageTemplate(String pageTemplate) {
		this.pageTemplate = pageTemplate;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "widgetInstancePage")
	public Set getWidgetInstancePageLayouts() {
		return this.widgetInstancePageLayouts;
	}

	public void setWidgetInstancePageLayouts(Set widgetInstancePageLayouts) {
		this.widgetInstancePageLayouts = widgetInstancePageLayouts;
	}

}
